﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="MARC.EHRS.VisualizationClient.Silverlight.App"
            xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  >
    <Application.Resources>
        <Style x:Key="ToggleButtonStyle" TargetType="ToggleButton">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Width" Value="32"/>
            <Setter Property="Height" Value="32"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <SolidColorBrush Color="Transparent"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ToggleButton">
                        <Grid Name="Grid">
                            <Grid.RenderTransform>
                                <CompositeTransform TranslateX="0" TranslateY="0" ScaleX="1" ScaleY="1"/>
                            </Grid.RenderTransform>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.TranslateY)" To="0" Duration="0:0:0.5"/>
                                            <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleX)" To="1" Duration="0:0:0.5"/>
                                            <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleY)" To="1" Duration="0:0:0.5"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleX)" By="0.2" Duration="0:0:0.5"/>
                                            <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleY)" By="0.2" Duration="0:0:0.5"/>
                                            <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.TranslateY)" By="-2" Duration="0:0:0.5"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="CheckStates">
                                    <VisualState x:Name="Checked">
                                        <Storyboard>
                                            <ColorAnimation Duration="0:0:01" Storyboard.TargetName="Border" Storyboard.TargetProperty="(Border.Background).(RadialGradientBrush.GradientStops)[0].Color"
                                                                To="#AAff9933">
                                            </ColorAnimation>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unchecked">
                                        <Storyboard>
                                            <ColorAnimation Duration="0:0:01" Storyboard.TargetName="Border" Storyboard.TargetProperty="(Border.Background).(RadialGradientBrush.GradientStops)[0].Color"
                                                                    To="#33ff9933">
                                            </ColorAnimation>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="Border" CornerRadius="6">
                                <Border.BorderBrush>
                                    <RadialGradientBrush RadiusX="0.5" RadiusY="0.3">
                                        <GradientStop Offset="0" Color="#333333"/>
                                        <GradientStop Offset="1" Color="White"/>
                                    </RadialGradientBrush>
                                </Border.BorderBrush>
                                <Border.Background>
                                    <RadialGradientBrush GradientOrigin="0.8,0.2">
                                        <GradientStop Color="#33ff9933" Offset="0"/>
                                        <GradientStop Color="#990033" Offset="2"/>
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter Cursor="Hand" x:Name="ContentPresenter"
                                                  Content="{TemplateBinding Content}"
                                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                                  VerticalAlignment="Center"
                                                  HorizontalAlignment="Center">

                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Application.Resources>
</Application>
